package com.ruoyi.framework.security.context;

import com.ruoyi.common.core.domain.model.MiniLoginUser;

public class UserContextHolder {

    public static ThreadLocal<MiniLoginUser> threadLocal = new ThreadLocal<>();

    public static void setCurrentUser(MiniLoginUser user) {
        threadLocal.set(user);
    }

    public static MiniLoginUser getCurrentUser() {
        return threadLocal.get();
    }

    public static void removeCurrentUser() {
        threadLocal.remove();
    }

}